//
// Created by Administrator on 2024/10/18.
//

#ifndef CNC_SIMULATION_QSS_H
#define CNC_SIMULATION_QSS_H
#include <QString>
//样式表

    //滚动条样式
    //竖直滚动条
    const QString scrollbarStyle =
            "QScrollArea {"
            "    border: 0px solid;"
            "    border-radius: 5px;"
            "}"
            "QScrollBar:vertical {"
            "    width: 10px;"
            "    border: 0px solid;"
            "    border-radius: 5px;"
            "    background: #e1f0fa;"
            "}"
            "QScrollBar:vertical:hover {"
            "    background: #e1f0fa;"
            "}"
            "QScrollBar::handle:vertical {"
            "    background: #c0ddee;"
            "    border-radius: 5px;"
            "    min-height: 40px;"
            "}"
            "QScrollBar::handle:vertical:hover {"
            "    background: #c0ddee;"
            "}"
            "QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {"
            "    height: 0px;"
            "    border: 0px solid;"
            "}"
            "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {"
            "    background: #e1f0fa;"
            "    border: 0px solid;"
            "    border-radius: 5px;"
            "}"
            "QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {"
            "    border: 0px solid;"
            "    border-radius: 3px;"
            "}";
    //水平滚动条
    const QString scrollbarStyleHorizontal =
        "QScrollArea {"
        "    border: 0px solid;"
        "    border-radius: 5px;"
        "}"
        "QScrollBar:horizontal {"
        "    height: 10px;"
        "    border: 0px solid;"
        "    border-radius: 5px;"
        "    background: #e1f0fa;"
        "}"
        "QScrollBar:horizontal:hover {"
        "    background: #e1f0fa;"
        "}"
        "QScrollBar::handle:horizontal {"
        "    background: #c0ddee;"
        "    border-radius: 5px;"
        "    min-width: 40px;"
        "}"
        "QScrollBar::handle:horizontal:hover {"
        "    background: #c0ddee;"
        "}"
        "QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {"
        "    width: 0px;"
        "    border: 0px solid;"
        "}"
        "QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {"
        "    background: #e1f0fa;"
        "    border: 0px solid;"
        "    border-radius: 5px;"
        "}"
        "QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal {"
        "    border: 0px solid;"
        "    border-radius: 3px;"
        "}";
// QToolButton 样式
const QString toolButtonStyle = R"(
QToolButton {
	background-color: #d6e1f0;
	color: #ffffff;
	border-color: #000000;
}
QToolButton::hover {
	background-color: #f0f5f3;
	color: #ffffff;
	border: none;
}
QToolButton::checked:hover {
	background-color: #5cc4ff;
	color: #ffffff;
	border: none;
}
QToolButton::pressed {
	background-color: #5cc4ff;
	color: #ffffff;
	border: none;
}
QToolButton::checked {
	background-color: #5cc4ff;
	color: #ffffff;
	border: none;
	show-decoration-selected: 0;
	outline: 0;
}
)";


// QWidget 样式
const QString widgetStyle = "QWidget { background-color: #e6e7eb; }";

// QLabel 样式
const QString labelStyle = "QLabel { background-color: transparent; color: #000000; border-color: #000000; }";

// QMenuBar 样式
const QString menuBarStyle = R"(
QMenuBar {
	background-color: #d6e1f0;
	color: #000;
}
QMenuBar::disabled {
	background-color: #404040;
	color: #656565;
	border-color: #051a39;
}
QMenuBar::item {
	background-color: transparent;
}
QMenuBar::item:selected {
	background-color: #a7dfff;
	color: #000;
}
QMenuBar::item:pressed {
	background-color: #98daff;
	border: 1px solid #000;
	margin-bottom: -1px;
	padding-bottom: 1px;
}
)";





// QLineEdit 样式
const QString lineEditStyle = "QLineEdit { background-color: #fefffc; color: #000; }";

// QTableWidget 样式//显示和编辑表格的控件
const QString tableWidgetStyle = "QTableWidget { background-color: #fff; padding: 10px; }";

// QComboBox 样式
const QString comboBoxStyle = R"(
QComboBox {
	background-color: #fefefe;
	border: 1px solid #1e1e1e;
	border-radius: 0px;
	padding-left: 6px;
	color: #000;
	height: 20px;
}
QComboBox:on {
	background-color: #fefefe;
}
QComboBox QAbstractItemView {
	background-color: #dcdcdf;
	color: #000;
	border: 1px solid black;
	selection-background-color: #217346;
	selection-color: #dcdcdf;
	outline: 0;
}
QComboBox::drop-down {
	subcontrol-origin: padding;
	subcontrol-position: top right;
	width: 15px;
	border-left-width: 0px;
	border-left-color: darkgray;
	border-left-style: solid;
	border-top-right-radius: 3px;
	border-bottom-right-radius: 3px;
}
QComboBox::down-arrow {
	image: url("./ressources/down_arrow.png");
	width:8px;
	height:8px;
}
)";

// QSpinBox 样式
const QString spinBoxStyle = R"(
QSpinBox {
	background-color: #fefefe;
	border-width: 1px;
	border-color: #1e1e1e;
	border-style: solid;
	color: #000;
	padding: 2px;
	selection-background-color: #4e4e8f;
}
QSpinBox::up-button,
QSpinBox::down-button {
	background-color: #fefefe;
}
QSpinBox::up-button:hover,
QSpinBox::down-button:hover {
	background-color: #fefefe;
}
QSpinBox::up-button:pressed,
QSpinBox::down-button:pressed {
	background-color: #ebebeb;
	border: 1px solid #ebebeb;
}
QSpinBox::down-arrow {
	image: url("./ressources/down_arrow.png");
	width: 7px;
}
QSpinBox::up-arrow {
	image: url("./ressources/up_arrow.png");
	width: 7px;
}
)";

// QSlider 样式
const QString sliderStyle = R"(
QSlider {
	background-color: transparent;
	padding: 2px;
}
QSlider::groove:horizontal {
	subcontrol-origin: content;
	background-color: transparent;
	height: 15px;
}
QSlider::handle:horizontal {
	background-color: #4ebfff;
	width: 15px;
	border-radius: 7px;
}
QSlider::sub-page:horizontal {
	background-color: #999;
	margin: 5px;
	border-radius: 5px;
}
QSlider::add-page:horizontal {
	background-color: #666;
	margin: 5px;
	border-radius: 5px;
}
)";

// QScrollBar 样式
const QString scrollBarStyle = R"(
QScrollBar:horizontal {
	background-color: #beccde;
	border: 1px solid darkgray;
	height: 15px;
}
QScrollBar::handle:horizontal {
	border: 1px solid gray;
	min-width: 100px;
	background-color: #e6edf6;
}
QScrollBar::add-line:horizontal,
QScrollBar::sub-line:horizontal,
QScrollBar::add-page:horizontal,
QScrollBar::sub-page:horizontal {
	width: 0px;
	background-color: transparent;
}
QScrollBar:vertical {
	background-color: #beccde;
	border: 1px solid darkgray;
	width: 14px;
}
QScrollBar::handle:vertical {
	border: 1px solid gray;
	min-height: 100px;
	background-color: #e6edf6;
}
QScrollBar::add-line:vertical,
QScrollBar::sub-line:vertical,
QScrollBar::add-page:vertical,
QScrollBar::sub-page:vertical {
	height: 0px;
	background-color: transparent;
}
)";

// QStatusBar 样式
const QString statusBarStyle = "QStatusBar { background-color: #d6e1f0; color: #000000; border-color: #000000; }";



#endif //CNC_SIMULATION_QSS_H
